﻿using Red.Controls.Shell;
using Red.EngineData.Protocol.Interop;
using System;
using System.Windows.Threading;

namespace BeefSandbox
{
    public class ViewUpdateUIThreadScheduler : IViewUpdateScheduler
    {
        public void Schedule(ViewUpdateEventHandler handler)
        {
            RedApplication.Current.Dispatcher.Invoke(DispatcherPriority.Background, new Action(
            () =>
            {
                handler();
            }));
        }
    }
}
